package com.atguigu.webflux.entity;

import org.springframework.data.annotation.Id;
import jakarta.persistence.Column;

import java.time.Instant;

public class BaseModel {
    @Id
    protected Long id;
    @Column(name="create_at")
    protected Instant createdAt;
    @Column(name="update_at")
    protected Instant updatedAt;

    public BaseModel() {}

    public BaseModel(Long id, Instant createdAt, Instant updatedAt) {
        this.id = id;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Instant getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Instant createdAt) {
        this.createdAt = createdAt;
    }

    public Instant getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Instant updatedAt) {
        this.updatedAt = updatedAt;
    }
}
